/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.querie.pojo;

/**
 *
 * @author a-skoshy
 */
public class Accuracy implements Comparable<Accuracy>{
    float precision;
    float recall;

    public Accuracy(float precision, float recall) {
        this.precision = precision;
        this.recall = recall;
    }

    public float getPrecision() {
        return precision;
    }

    public void setPrecision(float precision) {
        this.precision = precision;
    }

    public float getRecall() {
        return recall;
    }

    public void setRecall(float recall) {
        this.recall = recall;
    }



    public int compareTo(Accuracy obj) throws ClassCastException {
        float otherPrecision = ((Accuracy) obj).getPrecision();

        if (this.precision < otherPrecision) {
            return -1;

        } else if (this.precision > otherPrecision) {
            return 1;
        } else {
            return 0;
        }
    }

}
